home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
tpfast30.zip
/
TPFAST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-09-26
|
16KB
|
403 lines
{ _______________________________________________________________
| |
| Copyright (C) 1989,1990 Steven Lutrov |
|_______________________________________________________________|____
| | |
| Program Title : Tpfast.Pas | | ___
| Author : Steven Lutrov | | |
| Revision : 3.00 | | |
| Date : 1990-07-16 | | |
| Language : Turbo Pascal 5.5 | | |
| | | |
| Description : Unit File For All The Assembly Routines | | |
| : Fastscr.Asm Faststr.Asm Fastfile.Asm | | |
| : Fastgrp.Asm Fastbit.Asm Fastkbd.Asm | | |
| | | |
|_______________________________________________________________| | |
| | |
|________________________________________________________________| |
| |
|_________________________________________________________________|
}
Unit Tpfast;
{ ------------------------------------------------------------------------- }
Interface
{ ------------------------------------------------------------------------- }
Uses Dos,Crt;
{ ------------------------------------------------------------------------- }
Type
{ ------------------------------------------------------------------------- }
Stype = String[80]; { Used For 1 screen line Etc }
Cardtype = (None,Mda,Cga,Egamono,EgaColour,Vgamono,
VgaColour,Mcgamono,McgaColour);
{ ------------------------------------------------------------------------- }
Var
{ ------------------------------------------------------------------------- }
Errreturn : Byte; { Global Error Monitor }
Video_Buff : Word; { Address Of Video Buffer }
Snow_Check : Boolean; { Check For Snow On Screen Writes }
Video_Page : Byte; { Video Page Used For Screen Writes }
Textattr : Byte; { The Text Attribute Byte Setting }
Startline : Byte;
Stopline : Byte;
Textbufbase : Pointer; { Pointer to Base address of video screen }
{ ------------------------------------------------------------------------- }
Function Bytetohex(Work_: Byte): Stype;
Function Rotatewordleft(Work_: Word; Bits_: Byte): Word;
Function Rotatebyteright(Work_,Bits_: Byte): Byte;
Function Rotatebyteleft(Work_,Bits_:Byte): Byte;
Function Rotatewordright(Work_: Word; Bits_: Byte): Word;
Function Wordtohex(Work_: Word): Stype;
Function Closefile(Handle:Integer):Boolean;
Function Createfile(Fname:String; Attribute:Integer):Integer;
Function Erasefile(Name:String):Integer;
Function Fmovepointer(Handle,Mode:Integer;Offset:Longint;Var Location: Longint):Boolean;
Function Getverify: Boolean;
Function Getvolume(Disk: Integer; Workarea: Pointer): Stype;
Function Openfile(Name:String; Access:Integer):Integer;
Function Readfile(Handle:Word; Amount:Word; Var Buff):Integer;
Procedure Readsector(Segment,Offset,Drive,Sector,Number: Word);
Procedure Setverify(Setting: Boolean);
Procedure Setvolume(Disk: Integer; Newlabel: Stype; Workarea: Pointer);
Function Writefile(Handle:Integer; Nwrite:Word; Var Buff):Integer;
Procedure Writesector(Segment,Offset,Drive,Sector,Number: Word);
Procedure Clearpage(Pagenumber,Colour: Byte);
Procedure Copyclear(Box: Pointer; X_Pos,Y_Pos,X_Num,Y_Num,Colour: Byte);
Procedure Drawbox(Char_X ,Char_Y :Char;X_Pos,Y_Pos,X_Num,Y_Num,Colour:Byte);
Procedure Fillscreen(Ch: Char; X_Pos,Y_Pos,X_Num,Y_Num,Colour: Byte);
Procedure Restorescreen(Box: Pointer; X_Pos,Y_Pos,X_Num,Y_Num: Byte);
Procedure Savescreen(Box: Pointer; X_Pos,Y_Pos,X_Num,Y_Num: Byte);
Procedure Screendown(Box: Pointer; Var X_Pos,Y_Pos: Byte; X_Num,Y_Num: Byte);
Procedure Screenleft(Box:Pointer; Var X_Pos,Y_Pos: Byte; X_Num,Y_Num: Byte);
Procedure Screenright(Box:Pointer; Var X_Pos,Y_Pos: Byte; X_Num,Y_Num: Byte);
Procedure Screenup(Box: Pointer; Var X_Pos,Y_Pos: Byte; X_Num,Y_Num: Byte);
Procedure Scrollx(Where: Char; X_Pos,Y_Pos,X_Num,Y_Num,Cols,Colour: Byte);
Procedure Scrolly(Where: Char; X_Pos,Y_Pos,X_Num,Y_Num,Lines,Colour: Byte);
Procedure Swappage(Box: Pointer; Pagenumber: Byte);
Function Altkeydown: Boolean;
Function Capslockdown: Boolean;
Function Capslockon: Boolean;
Procedure Clearbuffer;
Procedure Clearcapslock;
Procedure Clearins;
Procedure Clearnumlock;
Procedure Clearscrolllock;
Function Ctrlkeydown: Boolean;
Function Freshchar: Char;
Function Getscan: Byte;
Function Inskeydown: Boolean;
Function Inskeyon: Boolean;
Procedure Keypause(Code: Char; Ascii: Boolean; Wait_A,Wait_B: Byte);
Function Lastkey: Char;
Function Leftshiftdown: Boolean;
Function Nextkey: Char;
Function Numlockdown: Boolean;
Function Numlockon: Boolean;
Function Readchar: Char;
Function Rightshiftdown: Boolean;
Function Scrolllockdown: Boolean;
Function Scrolllockon: Boolean;
Procedure Setcapslock;
Procedure Setins;
Procedure Setnumlock;
Procedure Setscrolllock;
Procedure Background(Code: Char);
Procedure Blinkoff;
Procedure Blinkon;
Procedure Colourx(X_Pos,Y_Pos,Y_Pos,Colour: Byte);
Procedure Cursordown(Y_Pos: Integer);
Procedure Cursorleft(Columns: Integer);
Procedure Cursoroff;
Procedure Cursoron;
Procedure Cursorright(Columns: Integer);
Procedure Cursorup(Y_Pos: Integer);
Procedure Dsp(Strx: Stype);
Procedure Dspat(Strx: Stype; X_Pos,Y_Pos,Colour: Byte);
Procedure Dspcolour(Strx: Stype; Colour: Byte);
Procedure Dspend(Strx: Stype; X_Pos,Y_Pos,Length,Colour: Byte);
Procedure Dspjust(Strx: Stype; X_Pos,Y_Pos,Colour: Byte);
Procedure Dspln(Strx: Stype);
Procedure Dsplncolour(Strx: Stype; Colour: Byte);
Procedure Dsppart(Strx: Stype; Start,Numch,X_Pos,Y_Pos,Colour: Byte);
Procedure Dspvert(Strx: Stype; X_Pos,Y_Pos,Colour: Byte);
Procedure Foreground(Code: Char);
Procedure Formatleft(Strx: Stype; How_Many: Integer; Colour: Byte);
Procedure Formatright(Strx: Stype; How_Many: Integer; Colour: Byte);
Function Getcolour(X_Pos,Y_Pos: Byte): Byte;
Function Getpage: Integer;
Procedure Intenseoff;
Procedure Intenseon;
Procedure Normal;
Procedure Reverse;
Procedure Rowcolour(X_Pos,Y_Pos,X_Num,Colour: Byte);
Procedure Screencolour(X_Pos,Y_Pos,X_Num,Y_Pos,Colour: Byte);
Procedure Setcolour(X_Pos,Y_Pos,Colour: Byte);
Procedure Setpage(Pagenumber: Integer);
Procedure Changechar(Var Strx: Stype; Search,Replace: Char);
Function Compare(Strg1,Strg2: Stype): Boolean;
Procedure Deletechar(Var Strx: Stype; Ch: Char);
Procedure Deleteleft(Var Strx: Stype; Border: Char);
Procedure Deleteright(Var Strx: Stype; Border: Char);
Function Leftend(Var Strx: Stype; Border: Char): Stype;
Procedure Lowercase(Var Strx: Stype);
Procedure Overwrite(Var Strx: Stype; Substrg: Stype; Position: Integer);
Procedure Padcentre(Var Strx: Stype; Ch: Char; Position,Length: Integer);
Procedure Padends(Var Strx: Stype; Ch: Char; Length: Integer);
Procedure Padleft(Var Strx: Stype; Ch: Char; Length: Integer);
Procedure Padright(Var Strx: Stype; Ch: Char; Length: Integer);
Procedure Replace(Var Strx: Stype; Substrg: Stype; Position,Chars: Integer);
Function Rightend(Var Strx: Stype; Border: Char): Stype;
Function Seekstring(Strx,Substrg: Stype; Startpt: Integer):Integer;
Function Stringend(Strx: Stype; Numberchars: Integer): Stype;
Function Stringof(Substrg: S